import unittest
from time import sleep
from tools.config import Config
from tools.tools import OpenApp


class BaseCase(unittest.TestCase):
    def setUp(self) -> None:
        config = Config("app.ini")
        capabilities = config.read_capabilities('xiachufang')
        self.driver = OpenApp(capabilities).start()
        sleep(15)

    def tearDown(self) -> None:
        sleep(5)
        self.driver.quit()
